Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DO NOT MERGE: chore: Switch from jest to node test runner #58

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

alexplischke
Copy link
Contributor

@alexplischke alexplischke commented Sep 14, 2023

This is a showcase for trying out node's test runner. See findings below.

before() setup failures

before() failures are not very elegantly handled:
node 20 before() failure

Node should rather explicitly call out that the before() function has failed instead of listing potentially hundreds of tests that failed because of it. The results are roughly identical, whether you use an assertion to fail before() or throw an error.

TypeScript

Since Node can't interpret TypeScript, you have to use a loader like ts-node or swc:
node --loader ts-node/esm --test-reporter spec --test tests/unit/reporter.spec.ts

Not an obstacle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant